<!doctype html>
<html lang="en">
  <head>
    {% block head %}
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    {% block styles %}
    <!-- Bootstrap CSS -->
    {{ bootstrap.load_css() }}
    {% if darkmode %}
    <link rel="stylesheet" href="{{ url_for('static', filename='generic-dark.css') }}"
          integrity="{{get_sri('static', 'generic-dark.css')}}"
          crossorigin="anonymous">
    {% else %}
    <link rel="stylesheet" href="{{ url_for('static', filename='generic.css') }}"
          integrity="{{get_sri('static', 'generic.css')}}"
          crossorigin="anonymous">
    {% endif %}
    <link rel="stylesheet" href="{{ url_for('static', filename='datatables.min.css') }}"
          integrity="{{get_sri('static', 'datatables.min.css')}}"
          crossorigin="anonymous">
    {% endblock %}

    <title>{% block title %}{% endblock%}</title>

    {% block card %}{% endblock %}

    {% endblock %}
  </head>
  <body class="ready sticky {% if darkmode %}bg-dark{% endif %}">
  <aside class="sidebar {% if darkmode %}bg-dark{% endif %}">
         <div class="search">
           <div class="input-wrap">
            <center><form action="{{ url_for('search') }}" method="post"><input type="text" name="search" value="" aria-label="Search text" placeholder="type to search"></form></center>
           </div>
         </div>
    <br/>
    <h1 class="app-name"><a class="app-name-link" data-nosearch="" href="/">🦕 RansomLook 🦖</a></h1>
    <div class="sidebar-nav">

          <ul><li {% if request.path == '/' %} class="active" {% endif %}><a href="{{ url_for('home') }}" title="Dashboard">Dashboard</a></li>
              <li {% if request.path == '/recent' %} class="active" {% endif %}><a href="{{ url_for('recent') }}" title="Recent posts">Recent posts</a></li>
              <li {% if request.path == '/status' or request.path == '/alive' %} class="active" {% endif %}><a href="{{ url_for('status') }}" title="Status">Status</a></li>
              {% if request.path == '/status' or request.path == '/alive' %}
                  <ul>
                      <li><a href=#groupsstatus>Groups Status</></li>
                      <li><a href=#marketsstatus>Markets Status</></li>
                      <li><a href={{ url_for('alive') }}>Alive</></li>
                  </ul>
              {% endif %}
              <li {% if request.path.startswith('/group') %} class="active" {% endif %}><a href="{{ url_for('groups') }}" title="Groups profiles">Groups profiles</a></li>
              {% if request.path == '/groups' %}{% block groups %}{% endblock %}{% endif %}
              <li {% if request.path.startswith('/notes') %} class="active" {% endif %}><a href="{{ url_for('notes') }}" title="Notes">Ransomware Notes</a></li>
              <li {% if request.path == '/markets' %} class="active" {% endif %}><a href="{{ url_for('markets') }}" title="Forums &amp; Market">Forums &amp; Market</a></li>
              {% if request.path == '/markets' %}{% block markets %}{% endblock %}{% endif %}
              <li {% if request.path == '/leaks' %} class="active" {% endif %}><a href="{{ url_for('leaks') }}" title="Leaks">Leaks</a></li>
              {% if activatedRF %}
              <li {% if request.path == '/RF' %} class="active" {% endif %}><a href="{{ url_for('rf') }}" title="RF Dumps">RF Dumps</a></li>
              {% endif %}
              <li {% if request.path == '/telegrams' %} class="active" {% endif %}><a href="{{ url_for('telegrams') }}" title="Telegrams">Telegrams</a></li>
              <li {% if request.path == '/twitters' %} class="active" {% endif %}><a href="{{ url_for('twitters') }}" title="Twitters">Twitters</a></li>
              <li {% if request.path == '/crypto' %} class="active" {% endif %}><a href="{{ url_for('crypto') }}" title="Cryptocurrencies">Cryptocurrencies</a></li>
              <li {% if request.path == '/stats' %} class="active" {% endif %}><a href="{{ url_for('stats') }}" title="Stats">Stats</a></li>
          </ul>
          {% if current_user.is_authenticated %}
          <ul><li>Admin Zone </li>
              <ul>
              <li {% if request.path == '/admin/add' %} class="active" {% endif %}><a href="{{ url_for('addgroup') }}" title="Add ">Add</a></li>
              <li {% if request.path == '/admin/edit' %} class="active" {% endif %}><a href="{{ url_for('edit') }}" title="Edit ">Edit</a></li>
              <li {% if request.path == '/admin/addpost' %} class="active" {% endif %}><a href="{{ url_for('addpost') }}" title="Add post ">Add post</a></li>
              <li {% if request.path == '/admin/alerting' %} class="active" {% endif %}><a href="{{ url_for('alerting') }}" title="Alerting ">Alerting</a></li>
              <li {% if request.path == '/admin/logs' %} class="active" {% endif %}><a href="{{ url_for('logs') }}" title="Logs ">Logs</a></li>
              </ul>
          </ul>
          {% endif %}          
    </div>
  </aside>
    <section class="content">
      {% block content %}{% endblock%}
    <footer position="absolute" bottom="0">
    <center><a href="{{ url_for('about') }}" title="About">About...</a> - Follow us on <a href='https://social.circl.lu/@Ransomlook' target="_blank">Mastodon</a> & <a href='https://bsky.app/profile/ransomlook.bsky.social' target="blank">BlueSky</a> - Contribute on <a href='https://github.com/RansomLook/RansomLook' target="_blank">GitHub</a> - RansomLook © 2022-2024</center>
    </footer>
    </section>
    {% block scripts %}
    <!-- Optional JavaScript -->
    {{ bootstrap.load_js() }}
    <script src='{{ url_for('static', filename='jquery.min.js') }}'
            integrity="{{get_sri('static', 'jquery.min.js')}}"
            crossorigin="anonymous"></script>
    <script src='{{ url_for('static', filename='datatables.min.js') }}'
            integrity="{{get_sri('static', 'datatables.min.js')}}"
            crossorigin="anonymous"></script>
    <script src='{{ url_for('static', filename='generic.js') }}'
            integrity="{{get_sri('static', 'generic.js')}}"
            crossorigin="anonymous"></script>
    {% endblock %}
  </body>
</html>
